import request from '@/axios'
import type { ListParams, Response } from '@/api/api'

export interface Row {
  id?: number
  no: string
  appid: string //appid
  app_secret: string //app_secret
  mch_id: string //mch_id 商户号
  mch_key: string //mch_key
  notify_url: string //notify_url 回调地址
  name: string //商城名称(小程序名称)
  logo: string //Logo 图片
  banner: string //图片
  api_key: string //api_key
  api_cert: string //支付证书
  api_cert_pem: string //证书秘钥
}
// 商城详情
export const getListApi = (): Promise<Response<Row>> => {
  return request.post({ url: '/config/mini/details' })
}
// 商城修改
export const getModifyApi = (data: ListParams): Promise<Response<Row>> => {
  return request.post({ url: '/config/mini/modify', data })
}
